package cn.keduox.entity;

import cn.keduox.annotation.Column;
import cn.keduox.annotation.Entity;
import cn.keduox.annotation.Id;
import cn.keduox.annotation.Table;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 书籍的一级类型
 */
@Table(name = "first_type")
public class FirstType implements Serializable{
    /**
     * 书本一级类型id
     */
    @Id(name = "id")
    @Column(name = "id")
    private String id;
    /**
     * 书本一级类型名称
     */
    @Column(name = "name")
    private String  name;
    /**
     *删除标记，0正常，1删除
     */
    @Column(name = "del_flag")
    private Integer deleteFlag;


    @Entity(table = "sub_type",field = "id",address = "cn.keduox.entity.SubType",name = "subTypeList")
    List<SubType> subTypeList=new ArrayList<>();

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }


    public FirstType(String id, String name, List<SubType> subTypeList) {
        this.id = id;
        this.name = name;
        this.subTypeList = subTypeList;
    }

    public List<SubType> getSubTypeList() {
        return subTypeList;
    }

    public void setSubTypeList(List<SubType> subTypeList) {
        this.subTypeList = subTypeList;
    }

    public FirstType() {
    }

    public FirstType(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
